package me.luger.project.fof.config.filter;

import me.luger.core.mvc.filter.pagecache.PageCacheFilter;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * FilterConfig
 *
 * @author luger
 * @date 2016/9/27 0027
 */
@Configuration
public class MyFilterConfig {
    //@Bean
    public FilterRegistrationBean pageCacheFilterRegistrationBean() {
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
        registrationBean.setName("pageCache");
        PageCacheFilter pageCacheFilter = new PageCacheFilter();
        registrationBean.setFilter(pageCacheFilter);
        registrationBean.addInitParameter("cacheNames","short_time_cache,long_time_cache,instant_time_cache");
        return registrationBean;
    }
}
